@import url("https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css");

/* 容器 */
.settings-container {
  min-height: 100vh;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  padding-bottom: 20px;
}

/* 顶部导航 */
.settings-header {
  display: flex;
  align-items: center;
  padding: 20px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}

.back-btn {
  width: 40px;
  height: 40px;
  border: none;
  background: rgba(123, 104, 238, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #7B68EE;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-right: 15px;
}

.back-btn:hover {
  background: rgba(123, 104, 238, 0.2);
  transform: scale(1.1);
}

.header-title {
  font-size: 20px;
  font-weight: 600;
  color: #333;
}

/* 设置内容 */
.settings-content {
  padding: 20px;
}

/* 设置分组 */
.settings-section {
  margin-bottom: 30px;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
}

.section-title {
  display: block;
  padding: 15px 20px;
  font-size: 16px;
  font-weight: 600;
  color: #333;
  background: rgba(123, 104, 238, 0.1);
  border-bottom: 1px solid rgba(123, 104, 238, 0.2);
}

/* 设置列表 */
.settings-list {
  padding: 0;
}

.setting-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 20px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  cursor: pointer;
  transition: all 0.3s ease;
}

.setting-item:last-child {
  border-bottom: none;
}

.setting-item:hover {
  background: rgba(123, 104, 238, 0.05);
}

.setting-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.setting-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #7B68EE;
  font-size: 16px;
}

.setting-label {
  font-size: 15px;
  color: #333;
  font-weight: 500;
}

.setting-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.setting-arrow {
  color: #ccc;
  font-size: 14px;
  transition: color 0.3s ease;
}

.setting-item:hover .setting-arrow {
  color: #7B68EE;
}

/* 更新状态 */
.update-status {
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 12px;
  font-weight: 500;
}

.update-status.idle {
  color: #666;
  background: rgba(0, 0, 0, 0.1);
}

.update-status.checking {
  color: #7B68EE;
  background: rgba(123, 104, 238, 0.1);
}

.update-status.available {
  color: #fff;
  background: #28a745;
}

.update-status.latest {
  color: #fff;
  background: #17a2b8;
}

.update-status.error {
  color: #fff;
  background: #dc3545;
}

/* 缓存大小 */
.cache-size {
  font-size: 12px;
  color: #666;
  background: rgba(0, 0, 0, 0.1);
  padding: 4px 8px;
  border-radius: 12px;
}

/* 应用版本 */
.app-version {
  font-size: 12px;
  color: #7B68EE;
  background: rgba(123, 104, 238, 0.1);
  padding: 4px 8px;
  border-radius: 12px;
}

/* 退出登录 */
.logout-item {
  background: rgba(220, 53, 69, 0.1);
}

.logout-item:hover {
  background: rgba(220, 53, 69, 0.2);
}

.logout-text {
  color: #dc3545;
}

.logout-item .setting-icon {
  color: #dc3545;
}

/* Switch 样式 */
uni-switch {
  transform: scale(0.8);
}

/* 响应式设计 */
@media screen and (max-width: 768px) {
  .settings-content {
    padding: 15px;
  }
  
  .settings-section {
    margin-bottom: 20px;
  }
  
  .setting-item {
    padding: 12px 15px;
  }
  
  .section-title {
    padding: 12px 15px;
    font-size: 15px;
  }
  
  .setting-label {
    font-size: 14px;
  }
  
  .header-title {
    font-size: 18px;
  }
}

@media screen and (max-width: 480px) {
  .settings-header {
    padding: 15px;
  }
  
  .settings-content {
    padding: 10px;
  }
  
  .setting-item {
    padding: 10px 12px;
  }
  
  .section-title {
    padding: 10px 12px;
    font-size: 14px;
  }
  
  .setting-label {
    font-size: 13px;
  }
  
  .setting-icon {
    font-size: 14px;
  }
  
  .back-btn {
    width: 35px;
    height: 35px;
    font-size: 14px;
  }
  
  .header-title {
    font-size: 16px;
  }
}

/* 动画效果 */
.settings-section {
  animation: slideInUp 0.6s ease-out;
}

.settings-section:nth-child(1) {
  animation-delay: 0.1s;
}

.settings-section:nth-child(2) {
  animation-delay: 0.2s;
}

.settings-section:nth-child(3) {
  animation-delay: 0.3s;
}

.settings-section:nth-child(4) {
  animation-delay: 0.4s;
}

.settings-section:nth-child(5) {
  animation-delay: 0.5s;
}

.settings-section:nth-child(6) {
  animation-delay: 0.6s;
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 加载状态 */
.setting-item.loading {
  opacity: 0.6;
  pointer-events: none;
}

.setting-item.loading .setting-icon {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* 暗色模式支持 */
@media (prefers-color-scheme: dark) {
  .settings-container {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
  }
  
  .settings-header {
    background: rgba(44, 62, 80, 0.9);
    border-bottom-color: rgba(255, 255, 255, 0.1);
  }
  
  .settings-section {
    background: rgba(44, 62, 80, 0.8);
  }
  
  .section-title {
    background: rgba(123, 104, 238, 0.2);
    color: #fff;
  }
  
  .setting-label {
    color: #fff;
  }
  
  .setting-item {
    border-bottom-color: rgba(255, 255, 255, 0.1);
  }
  
  .setting-item:hover {
    background: rgba(123, 104, 238, 0.1);
  }
  
  .header-title {
    color: #fff;
  }
}

/* 下载进度弹窗 */
.download-modal {
  width: 300px;
  background: #fff;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.download-header {
  padding: 20px;
  background: linear-gradient(135deg, #7B68EE, #6A5ACD);
  text-align: center;
}

.download-title {
  color: #fff;
  font-size: 18px;
  font-weight: 600;
}

.download-body {
  padding: 25px 20px;
}

.progress-container {
  margin-bottom: 15px;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: #f0f0f0;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 10px;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #7B68EE, #6A5ACD);
  border-radius: 4px;
  transition: width 0.3s ease;
}

.progress-text {
  display: block;
  text-align: center;
  font-size: 16px;
  font-weight: 600;
  color: #7B68EE;
}

.download-tip {
  display: block;
  text-align: center;
  font-size: 12px;
  color: #666;
  line-height: 1.4;
} 